package com.hit.eduService.service;

import com.hit.commonUtils.R;
import com.hit.eduService.entity.EduChapter;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hit.eduService.entity.chapter.ChapterVo;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author testjava
 * @since 2022-11-04
 */
public interface EduChapterService extends IService<EduChapter> {
    //根据课程id查询课程的章节和对应的小节
    public List<ChapterVo> getChapterVideoById(String courseId);

    //删除章节,删除时只删章节则这一章的小节还在数据库中，解决：删除章节时判断这一章有没有小节，只要还有没删除的小节这一章就不能删除
    public boolean deleteChapter(String chapterId);

    //根据课程id删除对应的全部章节
    void deleteChapterByCourseId(String courseId);
}
